<?php

namespace Home\Controller;

use Home\Core\CommandSDK;

class ForgetPasswordController extends BaseController
{
    /**
     * 修改密码
     */
    public function forget_password()
    {
        $param = I('post.');
        $param['oldpasswd']=substr(md5($param['oldpasswd']),0,16);
        $param['newpasswd']=substr(md5($param['newpasswd']),0,16);
        $sdk = new CommandSDK();
        $return = $this->http_request($sdk::ChangePassword, $param, 'GET');
        $array = json_decode(json_encode($return), true);
        $array['msg']=$sdk::error_code[$return->result];
        $this->ajaxReturn($array);
    }

}